/**
 * Created by HuQiang on 2017/8/3.
 */
import React from 'react';
import {Tabs} from 'antd';
import 'antd/dist/antd.css';  // or 'antd/dist/antd.less'
import HistoryExam from './HistoryExam'
import PersonDetail from './PersonDetail'
import ChangePwd from './ChangePwd'
import AboutSystem from './AboutSystem'
require("./Home.css");
const TabPane = Tabs.TabPane;


export default class Main extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            activeKey: "2"
        }
    }

    render() {
        return (
            <div>
                <Tabs
                    tabPosition="left"
                    onChange={(activeKey) => {
                        this.setState({
                            activeKey: activeKey
                        })
                    }}
                    activeKey={this.state.activeKey}
                    style={{height: "100%"}}>
                    <TabPane tab="设置个人信息" key="1"><PersonDetail/></TabPane>
                    <TabPane tab="查看考试历史" key="2"><HistoryExam user_id={this.props.location.state}/></TabPane>
                    <TabPane tab="修改密码" key="3"><ChangePwd/></TabPane>
                    <TabPane tab="关于系统" key="4"><AboutSystem/></TabPane>
                </Tabs>
            </div>
        );
    }
}